package Text_46;

public class SubClass extends SuperClass implements FacInter,SumInter{
	public SubClass() {}
	public SubClass(int num) {
		super(num);
	}
	
	public int sum() {
		int s = 0;
		for(int i=1;i<=super.getNum();i++) {
			if(i%2==1) {
				s = s+i;
			}
		}
		return s;
	}
	@Override
	public int fac() {
		int j = 1;
		for(int i=1;i<=super.getNum();i++) {
				j = j*i;
		}
		return j;
	}
}
